package cn.learn.jvm;

/**
 * @author huangyezhan
 * @version 1.0
 * @date 2020年12月20日15:28
 */
public class LocalVariablesTest {

    public static void main(String[] args) {
        LocalVariablesTest test = new LocalVariablesTest();
        int num = 10;
        test.test1();
    }

    private void test1() {
        int i = 20;
        System.out.println("test1");
    }


    private void test2() {
        int a = 0;
        {
            int b = 0;
            b = a+1;
        }
        //变量c使用之前以及经销毁的变量b占据的slot位置
        int c = a+1;
    }

}
